home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / driverkit / i386 / IOPCIDirectDevice.h < prev    next >
Text File  |  1994-12-02  |  2KB  |  68 lines

  1. /*
  2.  * Copyright (c) 1994 NeXT Computer, Inc.
  3.  *
  4.  * PCI direct device interface.
  5.  *
  6.  * HISTORY
  7.  *
  8.  * 19 Aug 1994  Dean Reece at NeXT
  9.  *    Added class methods.
  10.  *
  11.  * 13 May 1994    Dean Reece at NeXT
  12.  *    Created.
  13.  */
  14.  
  15. #import <driverkit/IODirectDevice.h>
  16. #import <driverkit/i386/PCI.h>        /* IOPCIConfigSpace defined */
  17.  
  18. @interface IODirectDevice (IOPCIDirectDevice)
  19.  
  20. /*
  21.  * Returns YES if PCI Bus support is enabled.  Returns NO otherwise.
  22.  */
  23. + (BOOL)isPCIPresent;
  24. - (BOOL)isPCIPresent;
  25.  
  26. /*
  27.  * Reads the device's entire configuration space.  Returns IO_R_SUCCESS if
  28.  * successful.  If this method fails, the driver should make no assumptions
  29.  * about the state of the data returned in the IOPCIConfigSpace struct.
  30.  */
  31. + (IOReturn)getPCIConfigSpace: (IOPCIConfigSpace *) configSpace
  32.     withDeviceDescription: descr;
  33.  
  34. - (IOReturn)getPCIConfigSpace: (IOPCIConfigSpace *) configSpace;
  35.  
  36. /*
  37.  * Writes the device's entire configuration space.  Returns IO_R_SUCCESS if
  38.  * successful.  If this method fails, the driver should make no assumptions
  39.  * about the state of the device's configuration space.
  40.  */
  41. + (IOReturn)setPCIConfigSpace: (IOPCIConfigSpace *) configSpace
  42.     withDeviceDescription: descr;
  43.  
  44. - (IOReturn)setPCIConfigSpace: (IOPCIConfigSpace *) configSpace;
  45.  
  46. /*
  47.  * Reads from the device's configuration space.  All access are 32 bits wide
  48.  * and the address must be aligned as such.
  49.  */
  50. + (IOReturn)getPCIConfigData: (unsigned long *) data
  51.           atRegister: (unsigned char) address
  52.        withDeviceDescription: descr;
  53.  
  54. - (IOReturn)getPCIConfigData: (unsigned long *) data
  55.           atRegister: (unsigned char) address;
  56.  
  57. /*
  58.  * Writes to the device's configuration space.  All access are 32 bits wide
  59.  * and the address must be aligned as such.
  60.  */
  61. + (IOReturn)setPCIConfigData: (unsigned long) data
  62.           atRegister: (unsigned char) address
  63.        withDeviceDescription: descr;
  64.  
  65. - (IOReturn)setPCIConfigData: (unsigned long) data
  66.           atRegister: (unsigned char) address;
  67. @end
  68.